17: Continuous Joint Distributions

Author

Derek Sollberger

Published

March 3, 2023

Joint Probability Density Function

Joint Probability Density Function

The joint probability density function \(f(x,y)\) to handle simultaneous calculations of random variables \(X\) and \(Y\) can be expressed as

\[P({\color{blue}a_{1} < X < a_{2}}, {\color{red}b_{1} < Y < b_{2}}) = \displaystyle{\color{blue}\int_{a_{1}}^{a_{2}}}{\color{red}\int_{b_{1}}^{b_{2}}} \! {\color{purple}f(x,y)} \, {\color{red}dy} \, {\color{blue}dx}\]

Properties
  • Each probability is between zero and one inclusively \[0 \leq {\color{purple}f(x,y)} \leq 1 \text{ for all } {\color{blue}$x$}, {\color{red}$y$}\]
  • All probabilities add up to 100 percent \[{\color{red}\displaystyle\int_{-\infty}^{\infty}}{\color{blue}\displaystyle\int_{-\infty}^{\infty}} \! {\color{purple}f(x,y)} \, {\color{blue}dx} \, {\color{red}dy} = 1\]

Setting

For the examples in this lecture session, we will model the queues at In-n-Out with random variables

In-n-Out

  • \(X\): wait time to order food
  • \(Y\): wait time to receive food

and a function of the form

\[{\color{purple}f(x,y)} = k{\color{blue}x}{\color{red}y}{\color{blue}e^{-x}}{\color{red}e^{-y/5}},\]

\[{\color{blue}x > 0}, \quad {\color{red}y > 0}\]

Normalization

Find the value of \(k\) so that \(f\) is a probability density function.

\[{\color{purple}f(x,y)} = k{\color{blue}x}{\color{red}y}{\color{blue}e^{-x}}{\color{red}e^{-y/5}}, \quad {\color{blue}x > 0}, \quad {\color{red}y > 0}\]

Joint Probability

\[{\color{purple}f(x,y)} = \displaystyle\frac{1}{25}{\color{blue}x}{\color{red}y}{\color{blue}e^{-x}}{\color{red}e^{-y/5}}, \quad {\color{blue}x > 0}, \quad {\color{red}y > 0}\]

Compute the probability that you will take {between 1 and 2 minutes to order} and wait {between 3 and 4 minutes to receive} your food.

Joint Cumulative Distribution Function

Joint Cumulative Distribution Function

In general, we handle the probability calculations with the joint cumulative distribution function \(F(a,b)\)

% joint cumulative distribution function \[{\color{purple}F(a,b)} = P({\color{blue}X \leq a}, {\color{red}Y \leq b}) = {\color{blue}\displaystyle\int_{-\infty}^{a}}{\color{red}\displaystyle\int_{-\infty}^{b}} \! {\color{purple}f(x,y)} \, {\color{red}dy} \, {\color{blue}dx} \]

Properties

We can verify that the joint CDF starts at zero

\[{\color{purple}F(0,0)} = 0\]

and that the joint CDF collects all probabilities

\[\displaystyle\lim_{a \to \infty, b \to \infty} F(a,b) = 1\]

If need be, we can recover the joint PDF from the joint CDF as the mixed second-order partial derivatives

\[{\color{purple}f(x,y)} = \displaystyle\frac{{\color{purple}\partial^{2}}}{{\color{blue}\partial x} {\color{red}\partial y}} {\color{purple}F(x,y)}\]

What is the joint CDF for the In-n-Out setting?

Marginal Probabilities

Marginal Cumulative Distribution Functions

The marginal cumulative distribution functions can be computed as

% marginal CDF \[\begin{array}{rcl} {\color{blue}F_{X}(a)} & = & \displaystyle\lim_{{\color{red}b \to \infty}} {\color{purple}F(a,b)} \\ {\color{red}F_{Y}(b)} & = & \displaystyle\lim_{{\color{blue}a \to \infty}} {\color{purple}F(a,b)} \\ \end{array}\]

Properties

Intuition: the marginal CDF is seeking to analyze the probabilities in just one variable regardless of the other variables, so ``eliminate’’ the other varibles by taking their limits to infinity.

We can verify that the marginal CDFs start at zero

\[{\color{blue}F_{X}(0)} = 0 \text{ and } {\color{red}F_{Y}(0)} = 0\]

and that the marginal CDFs collect all probabilities

\[\displaystyle\lim_{{\color{blue}a \to \infty}} {\color{blue}F_{X}(a)} = 1 \text{ and } \displaystyle\lim_{{\color{red}b \to \infty}} {\color{red}F_{Y}(b)} = 1\]

What are the marginal CDFs for the In-n-Out setting?

Marginal Probabilities

Marginal Cumulative Distribution Functions

The marginal probability density functions can be computed as

\[\begin{array}{rcl} {\color{blue}f_{X}(x)} & = & {\color{red}\displaystyle\int_{-\infty}^{\infty}} \! {\color{purple}f(x,y)} \, {\color{red}dy} \\ {\color{red}f_{Y}(y)} & = & {\color{blue}\displaystyle\int_{-\infty}^{\infty}} \! {\color{purple}f(x,y)} \, {\color{blue}dx} \\ \end{array}\]
Intuition

Intuition: the marginal PDF is seeking to analyze the probabilities in just one variable regardless of the other variables, so ``integrate out’’ the other variables.

Alternatively,

\[{\color{blue}f_{X}(x) = \displaystyle\frac{d}{dx} F_{X}(x)} \text{ and } {\color{red}f_{Y}(y) = \displaystyle\frac{d}{dy} F_{Y}(y)} \]

What are the marginal PDFs for the In-n-Out setting?

Marginal Expectation

In-N-Out

  • What is the expected wait time to order food?
  • What is the expected wait time to receive food?

Independence

Independence

Recall that two events \(A\) and \(B\) are independent if

\[{\color{purple}P(AB)} = {\color{blue}P(A)} \cdot {\color{red}P(B)}\]

Here, the variables \(X\) and \(Y\) in the In-n-Out example were independent, which can be easily verified by noting that the integrals were separable.

\[\begin{array}{rcl} {\color{purple}f(x,y)} & = & {\color{blue}f_{X}(x)} \cdot {\color{red}f_{Y}(y)} \\ {\color{red}\displaystyle\frac{1}{25}} {\color{blue}x}{\color{red}y}{\color{blue}e^{-x}}{\color{red}e^{-y/5}} & = & {\color{blue}xe^{-x}} \cdot {\color{red}\displaystyle\frac{y}{25}e^{-y/5}} \\ \end{array}\]

and

\[\begin{array}{rcl} {\color{purple}F(a,b)} & = & {\color{blue}\displaystyle\int_{-\infty}^{a}} {\color{red}\displaystyle\int_{-\infty}^{b}} \! {\color{purple}f(x,y)} \, {\color{red}dy} \, {\color{blue}dx} \\ ~ & = & {\color{red}\displaystyle\frac{1}{25}} {\color{blue}\displaystyle\int_{0}^{a}} {\color{red}\displaystyle\int_{0}^{b}} \! {\color{blue}x}{\color{red}y}{\color{blue}e^{-x}}{\color{red}e^{-y/5}} \, {\color{red}dy} \, {\color{blue}dx}\\ ~ & = & {\color{red}\displaystyle\frac{1}{25}} {\color{blue}\left(\displaystyle\int_{0}^{a} xe^{-x} \, dx \right)} {\color{red}\left(\displaystyle\int_{0}^{b} \! ye^{-y/5} \, dy \right)} \\ \end{array}\]
Dependence

Upcoming lectures: dependent variables

Looking Ahead

  • due Fri., Mar. 10:

    • WHW7
    • LHW6
    • Internet Connection (survey)
  • Exam 2 will be on Mon., Apr. 10

  • no lecture on Mar. 10, Mar. 24

tweet source